#include<bits/stdc++.h>
using namespace std;

string add(string &s1,string&s2)
{
    string ret;
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    int sz1=s1.size();
    int sz2=s2.size();
    int count=0;
    int i,j;
    while(i<sz1||j<sz2)
    {
        int tem1=i<sz1?s1[i++]-'0':0;
        int tem2=j<sz2?s2[j++]-'0':0;
        int ans=tem1+tem2+count;
        ret.push_back(ans%10+'0');
        count=ans/10;
    }
    while(count)
    {
        ret.push_back(count%10+'0');
        count/=10;
    }
    while(ret.size()>1&&ret[ret.size()-1]=='0') ret.pop_back();
    reverse(ret.begin(),ret.end());
    return ret;
    
}
int main()
{
    string s1,s2;
    cin>>s1>>s2;
    cout<<add(s1,s2);
    return 0;
}